#ifndef AACENCODETHREAD_H
#define AACENCODETHREAD_H

#include <QObject>
#include "FFThread.h"
#include "DeviceTool.h"
#include <QFile>

extern "C" {
    #include <libavcodec/avcodec.h>
    #include <libavutil/avutil.h>
}

class AACEncodeThread : public FFThread
{
    Q_OBJECT

private:
    int check_sample_fmt(const AVCodec *codec);

    int encode(AVCodecContext *ctx, AVFrame *frame, AVPacket *pkt, QFile &outFile);

public:
    void run();

    QString filePath;

    DeviceInfo *deviceInfo = nullptr;

signals:
};

#endif // AACENCODETHREAD_H
